package com.gl.saasservice.area.controller;

import com.gl.framework.web.response.Result;
import com.gl.saasservice.area.service.AreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 地区接口
 */
@RestController
@RequestMapping("/area")
public class AreaController {

    @Autowired
    private AreaService areaService;

    /**
     * 查询区域
     * @param parentId
     * @return
     * @throws Exception
     */
    @SuppressWarnings("rawtypes")
    @GetMapping(value ="/list")
    public Result list(@RequestParam Long parentId) throws Exception {
        return areaService.list(parentId);
    }

}
